﻿using System.Web.UI.WebControls.WebParts;

namespace Trentacular.SharePoint.Web.UI.WebParts
{
    public abstract class BaseEditorPart<T> : EditorPart where T : WebPart
    {
        /// <summary>
        /// Gets a reference to the
        /// <see cref="T:System.Web.UI.WebControls.WebParts.WebPart"/> control that is
        /// currently being edited.
        /// </summary>
        /// <value></value>
        /// <returns>
        /// A <see cref="T:System.Web.UI.WebControls.WebParts.WebPart"/> that is
        /// currently in edit mode.
        /// </returns>
        protected new T WebPartToEdit
        {
            get
            {
                return (T)base.WebPartToEdit;
            }
        }
    }
}